/**
 * @author LKQ
 * @date 2022/1/7 19:36
 * @description
 */
public class FormalSolution {
    public static void main(String[] args) {

    }
}
class NumArray1 {

    int[] sums;

    public NumArray1(int[] nums) {
        int n = nums.length;
        sums = new int[n + 1];
        for (int i = 0; i < n; i++) {
            sums[i + 1] = sums[i] + nums[i];
        }
    }

    public int sumRange(int i, int j) {
        return sums[j + 1] - sums[i];
    }
}
